<?php

use Illuminate\Database\Seeder;
use App\Models\Admin;
use Faker\Factory;


class AdminTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        //
        Admin::truncate();

        $faker  = Factory::create('zh_CN');

        $data = [];
        for($i=0;$i<5000;$i++){
            $data[] = [
                'name'=>$faker->name,
                'phone'=>$faker->phoneNumber,
                'email'=>$faker->email,
                'role'=>mt_rand(1,5),
                'is_use'=>mt_rand(1,2),
            ];
        }

        Admin::insert($data);

    }
}